<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>品牌列表页面</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
</head>

<body>
    <div id=app>
      <input type="button" name="" @click=getinfo value="get">
      <input type="button" name="" @click=postinfo value="post">
      <input type="button" name="" @click=getinfo value="jsonp">


    </div>
    <script type="text/javascript">
    
    var vm = new Vue({
        el: "#app",
       data:{

       }
      , methods:{
        getinfo(){
            this.$http.get("http://127.0.0.1:8080/test").then(function(d){
                console.log(d)
            })

        }
        , postinfo(){
            this.$http.post("http://vue.studyit.io/api/post",{},{emulateJSON:true}).then(d=>{
                console.log(d)
            })
       }
}
    })
    </script>
</body>

</html>